<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Set集合</title>
</head>

<body>
    <script>
        let s = new Set();
        let s2 = new Set(['a','b','c','d']) ;
        console.log(s2);
        console.log(s2.size);
        s2.delete('a');
        console.log(s2);
        s2.add('a');
        console.log(s2);
        for(let v  of s2){
            console.log(v);
        }
    </script>

</body>

</html>